home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-01-07 | 4.7 KB | 307 lines | [TEXT/MPS ] |
- /*
-
- Sample Source Code by Jack A. Littleton
-
- Example List Manager Application--TextList
- -------------------------------------------
-
- TextList.r -- Rez source code for all files in the package
- This file and all files in this package are copyright © 1989 by
- Jack A. Littleton, All rights reserved.
- Version 1.0 - January 1, 1989
-
- This package includes:
- TextList.r -- This file
- TextList.c -- C source code
- TextList.p -- Pascal source code
- PTextList.r -- Pascal-specific Rez source code
- CTextList.r -- C-specific Rez source code
- PTextList.make -- Makefile for Pascal TextList application
- CTextList.make -- Makefile for C TextList application
-
- SampleList.txt -- Documentation for this package
-
- */
-
- #include "Types.r"
- #include "SysTypes.r"
- #include "OpusTypes.r"
-
- type 'CASh' as 'STR ';
-
- resource 'MENU' (1112) {
- 1112,
- textMenuProc,
- allEnabled,
- enabled,
- "File",
- { /* array: 10 elements */
- /* [1] */
- "New List ", noIcon, "N", "", plain,
- /* [2] */
- "Close List", noIcon, "K", "", plain,
- /* [3] */
- "New Row", noIcon, "R", "", plain,
- /* [4] */
- "Delete Row", noIcon, "D", "", plain,
- /* [5] */
- "\Find…", noIcon, "F", "", plain,
- /* [6] */
- "Quit", noIcon, "Q", "", plain
- }
- };
-
- resource 'MENU' (1113) {
- 1113,
- textMenuProc,
- 0x7FFFFFBD,
- enabled,
- "Edit",
- { /* array: 8 elements */
- /* [1] */
- "Undo", noIcon, "Z", "", plain,
- /* [2] */
- "-", noIcon, "", "", plain,
- /* [3] */
- "Cut", noIcon, "X", "", plain,
- /* [4] */
- "Copy", noIcon, "C", "", plain,
- /* [5] */
- "Paste", noIcon, "V", "", plain,
- /* [6] */
- "Clear", noIcon, "", "", plain,
- /* [7] */
- "-", noIcon, "", "", plain,
- /* [8] */
- "Show Clipboard", noIcon, "", "", plain
- }
- };
-
- resource 'MENU' (1114) {
- 1114,
- textMenuProc,
- allEnabled,
- enabled,
- "List",
- { /* array: 7 elements */
- /* [1] */
- "One Selection Only", noIcon, "1", "", plain,
- /* [2] */
- "Drag Without Shift", noIcon, "2", "", plain,
- /* [3] */
- "No Disjoint Selections", noIcon, "3", "", plain,
- /* [4] */
- "Don't Extend Shift-Select", noIcon, "4", "", plain,
- /* [5] */
- "Don't Expand as Rects", noIcon, "5", "", plain,
- /* [6] */
- "Use Sense", noIcon, "6", "", plain,
- /* [7] */
- "Don't Highlight Empty Cells", noIcon, "7", "", plain
- }
- };
-
- resource 'MENU' (1115) {
- 1115,
- textMenuProc,
- allEnabled,
- enabled,
- "Cell",
- { /* array: 4 elements */
- /* [1] */
- "Indent Distance…", noIcon, "", "", plain,
- /* [2] */
- "Cell Size…", noIcon, "", "", plain,
- /* [3] */
- "Font", noIcon, hierarchicalMenu, "\0x01", plain,
- /* [4] */
- "Font Size…", noIcon, "", "", plain
- }
- };
-
- resource 'MENU' (1) {
- 1,
- textMenuProc,
- allEnabled,
- enabled,
- "Font",
- { /* array: 0 elements */
- }
- };
-
- resource 'WIND' (1112, preload) {
- {40, 120, 170, 390},
- altDBoxProc,
- -1,
- noGoAway,
- 0x0,
- "NoName"
- };
-
- resource 'WIND' (1113) {
- {45, 5, 330, 505},
- zoomDocProc,
- invisible,
- goAway,
- 0x0,
- "\0x00"
- };
-
- resource 'DLOG' (1112, "About box") {
- {38, 98, 321, 404},
- dBoxProc,
- visible,
- noGoAway,
- 0x0,
- 1112,
- "NoName"
- };
-
- resource 'DLOG' (128) {
- {42, 54, 168, 450},
- dBoxProc,
- invisible,
- goAway,
- 0x0,
- 128,
- ""
- };
-
- resource 'DLOG' (129) {
- {42, 142, 120, 364},
- dBoxProc,
- invisible,
- goAway,
- 0x0,
- 129,
- "New Dialog"
- };
-
- resource 'DLOG' (130) {
- {40, 94, 118, 404},
- dBoxProc,
- visible,
- goAway,
- 0x0,
- 130,
- "New Dialog"
- };
-
- resource 'DITL' (1112) {
- { /* array DITLarray: 1 elements */
- /* [1] */
- {2, 2, 281, 305},
- Picture {
- enabled,
- 128
- }
- }
- };
-
- resource 'DITL' (128) {
- { /* array DITLarray: 6 elements */
- /* [1] */
- {101, 165, 121, 225},
- Button {
- enabled,
- "OK"
- },
- /* [2] */
- {30, 200, 46, 275},
- EditText {
- enabled,
- ""
- },
- /* [3] */
- {60, 200, 76, 275},
- EditText {
- enabled,
- ""
- },
- /* [4] */
- {30, 50, 46, 195},
- StaticText {
- enabled,
- ""
- },
- /* [5] */
- {60, 50, 76, 195},
- StaticText {
- enabled,
- ""
- },
- /* [6] */
- {6, 87, 22, 279},
- StaticText {
- enabled,
- ""
- }
- }
- };
-
- resource 'DITL' (129) {
- { /* array DITLarray: 3 elements */
- /* [1] */
- {50, 85, 70, 145},
- Button {
- enabled,
- "OK"
- },
- /* [2] */
- {20, 128, 36, 188},
- EditText {
- enabled,
- ""
- },
- /* [3] */
- {20, 51, 36, 120},
- StaticText {
- enabled,
- "Font Size"
- }
- }
- };
-
- resource 'DITL' (130) {
- { /* array DITLarray: 3 elements */
- /* [1] */
- {50, 126, 70, 186},
- Button {
- enabled,
- "OK"
- },
- /* [2] */
- {22, 16, 38, 297},
- EditText {
- enabled,
- ""
- },
- /* [3] */
- {3, 13, 19, 55},
- StaticText {
- disabled,
- "Find:"
- }
- }
- };
-
- resource 'STR#' (128) {
- { /* array StringArray: 4 elements */
- /* [1] */
- "Change Cell Indentation",
- /* [2] */
- "Vertical",
- /* [3] */
- "Horizontal",
- /* [4] */
- "Change Cell Size"
- }
- };
-
- resource 'FREF' (1101) {
- 'APPL',
- 0,
- ""
- };
-
-